<template>
  <view class="page_index">
	  
	<!-- <u-skeleton :loading="loading" :animate="true" class="skeleton-in">
		
		 
	  </u-skeleton> -->
	   <u-skeleton :loading="loading" height="100%"></u-skeleton>
	  <view class="bc_img">
	  	<view style="width: 982rpx;height: 2100rpx;">
	  		 <image class="bc_img_in" src="/static/images/hd_bc.png" style="width: 982rpx;height: 2100rpx;" lazy-load @load="imgonload"></image>
	  	</view>
	   	 
	   </view>
	  <view class="bt-in-k">
	  	<view class="bt-in" @click="inhome">
	  		进入活动
	  	</view>
	  </view>
	 
	  <view class="select-in">
	  	<u-checkbox-group>
	  		<u-checkbox v-model="checked" shape="circle"></u-checkbox>
	  	</u-checkbox-group>
		<view class="user-qx">
			我已阅读并同意<text @click="usertest">《用户协议》</text>
		</view>
	  </view>
	  
	  
   
 
	
    <!-- 首页展示 -->
	 <!-- :style="{marginTop:statusBarHeight,paddingTop:'90rpx'}" -->
    <view
      class="page_content"
     
      v-if="navIndex == 0"
    >
	
</view>
	  
   
	
  </view>
</template>

<script>
import AuthorizationPopup from "@/components/AuthorizationPopup/index";
import { mapGetters } from "vuex";
import { BASE_URL_IMAHE } from "../../../utils/https";
// import { bannerList } from "@/api/banner";
// import { getHomePage } from "@/api/index/index";

var statusBarHeight = uni.getSystemInfoSync().statusBarHeight?uni.getSystemInfoSync().statusBarHeight + "px":"30rpx";
console.log("uni.getSystemInfoSync()",uni.getSystemInfoSync())

let app = getApp();
export default {
  name: "index.vue",
  // computed: mapGetters(["isLogin"]),
  components: {
    AuthorizationPopup,
  },

  onLoad() {
   uni.showLoading({
   	title:"加载中",
   })
	   
  },
  /**
   * 分享当前页面
   */
  onShareAppMessage(e) {
    return {
      title: "一个兴趣社交购物平台",
      imageUrl:
        BASE_URL_IMAHE +
        "file/test/productImage/20230710/285ce91ce9774534b5c57947ca7c96c9.jpg",
      path: `/pages/index/index?parentInviteCode=${
        uni.getStorageSync("phoneNumber") || ""
      }`,
    };
  },
  onShow() {
	  
    // this.bannerList();
    console.log("22");
    let self = this;
     this.listPage();
    // if (uni.getStorageSync("token")) {
    //   this.$refs.authRef.cancel();
    // }
    // setTimeout(() => {
    //   if (!uni.getStorageSync("token") && !uni.getStorageSync("modal")) {
    //     //第一次进入弹窗
    //     this.$refs.authRef.showToggle();
    //     uni.setStorageSync("modal", true);
    //   }
    // }, 1000);


    // this.getShopPingApi();
   
  },
  data() {
    return {
      loading: true,
	  
      skeleton: [
        "line-sm*3",
        40,
        "card",
        "circlesm*2",
        "line",
        "card-lg",
        40,
        "news",
        "line-sm*3+square",
      ],
     navIndex:0,
	 checked:false,
	  
    };
  },
  //上拉
  onReachBottom() {
    console.log("触发上拉加载");
    // this.getShopPingApi();
  },
  methods: {
	  imgonload(){
	  		this.loading = false
	  		uni.hideLoading();  
	  },
	 inhome(){
		 if(!this.checked){
			 uni.showToast({
			 	icon:'none',
				title:"请阅读并勾选用户协议"
			 })
			 return
		 } 	
		 uni.reLaunch({
		 	url:"/pages/home/index"
		 })
	 },
    async listPage() {
		
		
		// setTimeout(()=>{
		
		// },5000)
		
      // Promise.all([ this.getShopPingApi()]).finally(
      //   () => (this.loading = false)
      // );
	  
    },

    
  },
};
</script>

<style scoped lang="scss">
.page_index {
	width: 750rpx;
  background-color: #F5F5F5 !important;
  min-height: 100vh;
  // padding-bottom: rpx(16);
  　　padding-bottom: constant(safe-area-inset-top);  // 顶部安全区
  　　padding-bottom: env(safe-area-inset-top);    // 顶部安全区
  　　padding-bottom: constant(safe-area-inset-bottom);  // 底部安全区
  　　padding-bottom: env(safe-area-inset-bottom);    // 底部安全区
  　　box-sizing: content-box;
  margin: 0 auto;
}
.skeleton-in{
	width: 750rpx;
	height: 100%;
}
.bc_img{
	width: 750rpx;
	height: 100vh;
	display: flex;
	margin: 0 auto;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	.bc_img_in{
		
		
	}
}
.bc_img-gjp{
	position: fixed; 
	width: 100%;
	height: 100%;
}
.bt-in-k{
	width: 100%;
	position: absolute;
	bottom: 500rpx;
	left: 0rpx;
}

.bt-in{
	
	width: 650rpx;
	margin: 0 auto;
	text-align: center;
	background-color: white;
	height: 110rpx;
	box-sizing: border-box;
	border: 1rpx solid #e3e3e3;
	border-radius: 25rpx;
	font-size: 34rpx;
	font-weight: bold;
	line-height: 110rpx;
}
.select-in{
	display: flex;
	align-items: center;
	justify-content: center;
	position:absolute;
	width: 100%;
	bottom: 147rpx;
	color: white;
	left: 0;
		
	.user-qx{
		margin-left: -20rpx;
	}
}

</style>
